CREATE TABLE [dbo].[TDPLAN_LIQU]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[NU_PLAN] [dbo].[TD_VC_010] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDPLAN_LI__NU_SE__1F198FD4] DEFAULT ((0)),
[NU_DOCU_CLIE] [dbo].[TD_VC_020] NOT NULL,
[CO_TIPO_DOCU] [dbo].[TD_VC_003] NOT NULL,
[FE_EMIS] [dbo].[TD_DT_001] NOT NULL,
[FE_VENC] [dbo].[TD_DT_001] NOT NULL,
[CO_MONE] [dbo].[TD_VC_003] NOT NULL,
[FE_PROG_COBR] [dbo].[TD_DT_001] NULL,
[IM_TOTA] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDPLAN_LI__IM_TO__200DB40D] DEFAULT ((0)),
[IM_PAGA] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDPLAN_LI__IM_PA__2101D846] DEFAULT ((0)),
[IM_SALD] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDPLAN_LI__IM_SA__21F5FC7F] DEFAULT ((0)),
[IM_LIQU] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDPLAN_LI__IM_LI__22EA20B8] DEFAULT ((0)),
[CO_CLIE] [dbo].[TD_VC_020] NOT NULL,
[CO_UBIC_GEOG] [dbo].[TD_VC_006] NULL,
[CO_BANC] [dbo].[TD_VC_003] NULL,
[NU_CNTA_BANC] [dbo].[TD_VC_020] NULL,
[CO_CAJA] [dbo].[TD_VC_008] NULL,
[AA_MOVI] [dbo].[TD_VC_004] NULL,
[MM_MOVI] [dbo].[TD_VC_002] NULL,
[NU_COMP_MOVI] [dbo].[TD_VC_008] NULL,
[NU_SECU_MOVI] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TDPLAN_LI__NU_SE__23DE44F1] DEFAULT ((0)),
[CO_TIDO_BANC] [dbo].[TD_VC_003] NULL,
[NU_DOCU_BANC] [dbo].[TD_VC_020] NULL,
[CO_BANC_CHEQ] [dbo].[TD_VC_003] NULL,
[NU_CHEQ] [dbo].[TD_VC_020] NULL,
[CO_TIPO_OPER] [dbo].[TD_VC_003] NULL,
[CO_UNID_CNTB] [dbo].[TD_VC_003] NULL,
[TI_ENTI] [dbo].[TD_VC_001] NULL,
[FE_DISP] [dbo].[TD_DT_001] NULL,
[CO_ENTI] [dbo].[TD_VC_020] NULL,
[FE_OPER] [dbo].[TD_DT_001] NULL,
[FA_TIPO_CAMB] [dbo].[TD_NU_015_006] NULL,
[NU_RECI_COBR] [dbo].[TD_VC_010] NULL,
[FE_RECI_COBR] [dbo].[TD_DT_001] NULL,
[CO_MONE_COBR] [dbo].[TD_VC_003] NULL,
[FA_CAMB_COBR] [dbo].[TD_NU_015_006] NULL,
[ST_CIER_DOCU] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TDPLAN_LI__ST_CI__24D2692A] DEFAULT ('N'),
[CO_SUBR] [dbo].[TD_VC_003] NULL,
[DE_OBSE] [dbo].[TD_VC_100] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDPLAN_LI__CO_US__26BAB19C] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDPLAN_LI__FE_US__27AED5D5] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDPLAN_LI__CO_US__28A2FA0E] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDPLAN_LI__FE_US__29971E47] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDPLAN_LIQU] WITH NOCHECK ADD CONSTRAINT [CK__TDPLAN_LI__ST_CI__25C68D63] CHECK NOT FOR REPLICATION (([ST_CIER_DOCU]='N' OR [ST_CIER_DOCU]='S'))
GO
ALTER TABLE [dbo].[TDPLAN_LIQU] ADD CONSTRAINT [PK__TDPLAN_L__6E10446D10C14EDC] PRIMARY KEY CLUSTERED  ([CO_EMPR], [NU_PLAN], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDPLAN_LIQU] ADD CONSTRAINT [FK__TDPLAN_LIQU__64CDBE05] FOREIGN KEY ([CO_EMPR], [NU_PLAN]) REFERENCES [dbo].[TCPLAN_LIQU] ([CO_EMPR], [NU_PLAN])
GO
